<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:converge="http://com.interactivemediamanagement.converge/tags">

    <c:if test="#{newsItem.fieldVisible['SECTION'] || newsItem.fieldVisible['EDITION'] || newsItem.fieldVisible['START'] || newsItem.fieldVisible['POSITION']}">

        <converge:moduleHeader moduleTitle="#{msgs.newsitem_PLACEMENT}" />

        <div>
            <h:panelGrid rendered="#{value.readOnly}" columns="2" style="width: 98%; margin-left: 1%; margin-right: 1%;">
                <h:outputText value="#{msgs.newsitem_EDITION}: " rendered="#{newsItem.fieldVisible['EDITION']}" />
                <h:outputText value="#{value.selectedNewsItem.edition.friendlyName}" rendered="#{value.selectedNewsItem.edition != null &amp;&amp; newsItem.fieldVisible['EDITION']}" />
                <h:outputText value="#{msgs.NOT_SET}" rendered="#{newsItem.selectedNewsItem.edition == null &amp;&amp; newsItem.fieldVisible['EDITION']}" />

                <h:outputText value="#{msgs.newsitem_SECTION}: " rendered="#{newsItem.fieldVisible['SECTION']}" />
                <h:outputText value="#{value.selectedNewsItem.section.name}" rendered="#{value.selectedNewsItem.section != null &amp;&amp; newsItem.fieldVisible['SECTION']}" />
                <h:outputText value="#{msgs.NOT_SET}" rendered="#{value.selectedNewsItem.section == null &amp;&amp; newsItem.fieldVisible['SECTION']}" />

                <h:outputText value="#{msgs.newsitem_START}: " rendered="#{newsItem.fieldVisible['START']}" />
                <h:outputText value="#{value.selectedNewsItem.start}" rendered="#{newsItem.fieldVisible['START']}" />

                <h:outputText value="#{msgs.newsitem_POSITION}: " rendered="#{newsItem.fieldVisible['POSITION']}" />
                <h:outputText value="#{value.selectedNewsItem.position}" rendered="#{newsItem.fieldVisible['POSITION']}" />
            </h:panelGrid>

            <h:panelGrid rendered="#{value.currentActor &amp;&amp; !value.readOnly}" style="width: 98%; margin-left: 1%; margin-right: 1%;">
                <h:outputText value="#{msgs.newsitem_EDITION}" rendered="#{newsItem.fieldVisible['EDITION']}" />
                <h:selectOneMenu value="#{value.selectedNewsItem.edition}" converter="#{converters.editionConverter}" rendered="#{newsItem.fieldVisible['EDITION']}">
                    <f:selectItem itemLabel="" />
                    <f:selectItems value="#{value.openEditions}" />
                </h:selectOneMenu>

                <h:outputText value="#{msgs.newsitem_SECTION}" rendered="#{newsItem.fieldVisible['SECTION']}" />
                <h:selectOneMenu id="somEditionSection" value="#{value.selectedNewsItem.section}" converter="#{converters.sectionConverter}" rendered="#{newsItem.fieldVisible['SECTION']}">
                    <f:selectItem itemLabel="" />
                    <f:selectItems value="#{value.sections}" />
                </h:selectOneMenu>

                <h:outputText value="#{msgs.newsitem_START}" rendered="#{newsItem.fieldVisible['START']}" />
                <rich:inputNumberSpinner value="#{value.selectedNewsItem.start}" rendered="#{newsItem.fieldVisible['START']}" />

                <h:outputText value="#{msgs.newsitem_POSITION}" rendered="#{newsItem.fieldVisible['POSITION']}" />
                <rich:inputNumberSpinner value="#{value.selectedNewsItem.position}" rendered="#{newsItem.fieldVisible['POSITION']}" />
            </h:panelGrid>
        </div>

        <div style="clear: both; padding-bottom: 12px;"></div>
    </c:if>

</ui:composition>